package com.xbb.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
/**
 * <p>
 * 用户表
 * </p>
 *
 * @author Mr xie
 * @since 2020-05-19
 */
@Getter
@Setter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("users")
public class User{
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotNull(message = "用户账号不能为空")
    @Size(min = 2, max = 11, message = "账号长度必须是2-11个字符")
    private String loginName;
    private String password;
    private String isLockout;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date creatTime;
    private Integer psdWrongTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lockTime;
    private String protectEmail;
    private String protectMtel;

}
